package com.siyao.redvip.components.view;

import com.siyao.redvip.R;

import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.AnimationDrawable;
import android.view.View;
import android.widget.ImageView;

public class LoadingDialog extends Dialog {

    /**
     * 缓冲界面
     *
     * @param context
     */

    public LoadingDialog(Context context){
        super(context,R.style.dialog_activity);
        View dialogView=getLayoutInflater().inflate(R.layout.dialog_loading,null);
        ImageView ivLoading= (ImageView) dialogView.findViewById(R.id.loading);
        ivLoading.setImageResource(R.drawable.loading_bg);
        setContentView(dialogView);
        AnimationDrawable animationDrawable= (AnimationDrawable) ivLoading.getDrawable();
        animationDrawable.start();
    }
}
